package cc.ding.service.Impl;

import cc.ding.dao.EnrollDao;
import cc.ding.dao.Impl.EnrollDaoImpl;
import cc.ding.entity.Department;
import cc.ding.entity.Employee;
import cc.ding.entity.Position;
import cc.ding.service.EnrollService;

import java.util.List;

public class EnrollServiceImpl implements EnrollService {
    EnrollDao enrollDao = new EnrollDaoImpl();
    @Override
    public List<Department> selectDepart() {
        return enrollDao.selectDepart();
    }

    @Override
    public List<Position> selectPosition() {
        return enrollDao.selectPosition();
    }

    @Override
    public boolean add(Employee employee) {
        int count = -1;
        //新增
        count = enrollDao.add(employee);
        return count > 0 ? true : false;
    }
}
